<template>
    <div class="common-layout">
        <el-container class="container">
            <el-header>
                <HeaderView :name="loginstore.data" />
            </el-header>
            <el-container>
                <div class="aside-main">
                    <el-aside width="200px">
                        <AsideView />
                    </el-aside>
                </div>
                <el-main style="height: calc(100vh - 70px)">
                    <!-- {{ loginstore.token }} -->
                    <router-view></router-view>
                </el-main>
            </el-container>
        </el-container>
    </div>
</template>
<script setup>
import AsideView from "../components/AsideView.vue";
import HeaderView from "../components/HeaderView.vue";
import { Document, Menu as IconMenu, Location, Setting } from "@element-plus/icons-vue";
import { useLogin } from "../stores/login.js";
import router from "@/router/index.js";
import { ref, onMounted } from "vue";
const loginstore = useLogin();

import axios from "../api/axios.js";

onMounted(() => {
    axios.get("/admin/statistic/product").then((res) => {
        //console.log("res", res);
    });
});
</script>
<style lang="css" scoped>
.el-header {
    background-color: #545c64;
    height: 70px;
}
.aside-main {
    width: 200px;
    height: calc(100vh - 70px);
    background-color: #545c64;
    border: none;
}
.common-layout {
    height: calc(100% - 70px);
}
.container {
    height: calc(100% - 70px);
}
</style>
